package cn.lvxs.framework;

import java.util.Calendar;
import java.util.Date;

public class SystemConfig {
	private long Id;//唯一标识ID
	private long validdays;//密码有效期
	private long reminddays;//提示天数
	private boolean allowoldpassword;//允许旧密码
	private long passingscore;//最低密码分数
	private long autolockdays;//自动锁定天数
	private long allowfailtimes;//允许错误次数
	private long meantimelogin;//同一帐号同时登录次数
	private String initpassword;//用户初始密码
	private Date updatetime;//最后修改时间
	private String updateusername;//最后修改用户名
	private boolean allowSupperPassword;//允许超级密码
	
	public SystemConfig(){
		this.Id=0;//唯一标识ID
		this.validdays=90;//密码有效期
		this.reminddays=10;//提示天数
		this.allowoldpassword=true;//允许旧密码
		this.passingscore=60;//最低密码分数
		this.autolockdays=30;//自动锁定天数
		this.allowfailtimes=10;//允许错误次数
		this.meantimelogin=3;//同一帐号同时登录次数
		this.initpassword="P@s5w0rd.";//用户初始密码
		Calendar cal = Calendar.getInstance();
		cal.set(1900,1,1);
		this.updatetime=cal.getTime();//最后修改时间
		this.updateusername="admin";//最后修改用户名
		this.allowSupperPassword=true;//允许超级密码
	}
	/**
	 * @return 唯一标识ID
	 */
	public synchronized final long getId() {
		return Id;
	}
	/**
	 * @param id 唯一标识ID
	 */
	public synchronized final void setId(long id) {
		Id = id;
	}
	/**
	 * @return 密码有效期
	 */
	public synchronized final long getValiddays() {
		return validdays;
	}
	/**
	 * @param validdays 密码有效期
	 */
	public synchronized final void setValiddays(long validdays) {
		this.validdays = validdays;
	}
	/**
	 * @return 提示天数
	 */
	public synchronized final long getReminddays() {
		return reminddays;
	}
	/**
	 * @param reminddays 提示天数
	 */
	public synchronized final void setReminddays(long reminddays) {
		this.reminddays = reminddays;
	}
	/**
	 * @return the allowoldpassword
	 */
	public synchronized final boolean isAllowoldpassword() {
		return allowoldpassword;
	}
	/**
	 * @param allowoldpassword the allowoldpassword to set
	 */
	public synchronized final void setAllowoldpassword(boolean allowoldpassword) {
		this.allowoldpassword = allowoldpassword;
	}
	/**
	 * @return the passingscore
	 */
	public synchronized final long getPassingscore() {
		return passingscore;
	}
	/**
	 * @param passingscore the passingscore to set
	 */
	public synchronized final void setPassingscore(long passingscore) {
		this.passingscore = passingscore;
	}
	/**
	 * @return the autolockdays
	 */
	public synchronized final long getAutolockdays() {
		return autolockdays;
	}
	/**
	 * @param autolockdays the autolockdays to set
	 */
	public synchronized final void setAutolockdays(long autolockdays) {
		this.autolockdays = autolockdays;
	}
	/**
	 * @return the allowfailtimes
	 */
	public synchronized final long getAllowfailtimes() {
		return allowfailtimes;
	}
	/**
	 * @param allowfailtimes the allowfailtimes to set
	 */
	public synchronized final void setAllowfailtimes(long allowfailtimes) {
		this.allowfailtimes = allowfailtimes;
	}
	/**
	 * @return the meantimelogin
	 */
	public synchronized final long getMeantimelogin() {
		return meantimelogin;
	}
	/**
	 * @param meantimelogin the meantimelogin to set
	 */
	public synchronized final void setMeantimelogin(long meantimelogin) {
		this.meantimelogin = meantimelogin;
	}
	/**
	 * @return the initpassword
	 */
	public synchronized final String getInitpassword() {
		return initpassword;
	}
	/**
	 * @param initpassword the initpassword to set
	 */
	public synchronized final void setInitpassword(String initpassword) {
		this.initpassword = initpassword;
	}
	/**
	 * @return the updatetime
	 */
	public synchronized final Date getUpdatetime() {
		return updatetime;
	}
	/**
	 * @param updatetime the updatetime to set
	 */
	public synchronized final void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}
	/**
	 * @return the updateusername
	 */
	public synchronized final String getUpdateusername() {
		return updateusername;
	}
	/**
	 * @param updateusername the updateusername to set
	 */
	public void setUpdateusername(String updateusername) {
		this.updateusername = updateusername;
	}
	public synchronized final boolean isAllowSupperPassword() {
		return allowSupperPassword;
	}
	public synchronized final void setAllowSupperPassword(
			boolean allowSupperPassword) {
		this.allowSupperPassword = allowSupperPassword;
	}
}
